import request from '@/utils/request'

// 创建学校年级信息
export function createSchoolGrade(data) {
  return request({
    url: '/system/school-grade/create',
    method: 'post',
    data: data
  })
}

// 更新学校年级信息
export function updateSchoolGrade(data) {
  return request({
    url: '/system/school-grade/update',
    method: 'put',
    data: data
  })
}

// 删除学校年级信息
export function deleteSchoolGrade(id) {
  return request({
    url: '/system/school-grade/delete?id=' + id,
    method: 'delete'
  })
}

// 获得学校年级信息
export function getSchoolGrade(id) {
  return request({
    url: '/system/school-grade/get?id=' + id,
    method: 'get'
  })
}

// 获得学校年级信息分页
export function getSchoolGradePage(query) {
  return request({
    url: '/system/school-grade/page',
    method: 'get',
    params: query
  })
}

// 导出学校年级信息 Excel
export function exportSchoolGradeExcel(query) {
  return request({
    url: '/system/school-grade/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
